<?php

$json = '{"student_uid":1,"gender":"F","email":"Isabella.Smith@hunter.cuny.edu","first_name":"Isabella","last_name":"Smith"}';

$foo = json_decode($json, true);

/******* from a web page **************
$json = file('http://localhost/info.php');

$foo = json_decode($json[0], true);

**********************************************/
$student = array();
?>

<div id="wrapper">
	<div id="content">

	<?php
		foreach($foo as $key => $val){
			$key = str_replace("_", " ", $key);
			$key = ucwords($key);
			$student[$key] = $val;
			//print "<p>$key: $val </p>\n";
		}
		//print $_SERVER['REQUEST_METHOD'];
		print "<p>" . $student['Student Uid'] . ". " . $student['Last Name'] . ", " . $student['First Name'] . " "; 			print "(" . $student['Gender'] . ")<br>" . $student['Email'] . "</p>";

	?>
	</div>
</div>


